home *** CD-ROM | disk | FTP | other *** search
/ DIM Series: Yumi Fukawa / DIM Series: Yumi Fukawa.iso / pc / data / photo_s.dxr / 00006_album editor script.ls < prev    next >
Encoding:
Text File  |  1998-06-10  |  2.4 KB  |  75 lines

  1. global knummaxalbumphotos, kalbumeditorthumbnailsprnumbgn, kalbumeditorinsertareasprnumbgn, gcurphotoorder, galbumphotoorder, gcurphotonum
  2.  
  3. on updatealbumeditorthumbnail
  4.   busycurs()
  5.   repeat with aphotocount = 1 to knummaxalbumphotos
  6.     set athumbnailsprnum to kalbumeditorthumbnailsprnumbgn + aphotocount - 1
  7.     sendSprite(athumbnailsprnum, #mresetphotonum)
  8.     sendSprite(athumbnailsprnum, #mupdatethumbnailview)
  9.   end repeat
  10.   set anumalbumphoto to count(galbumphotoorder)
  11.   repeat with aphotocount = 1 to anumalbumphoto
  12.     set athumbnailsprnum to kalbumeditorthumbnailsprnumbgn + aphotocount - 1
  13.     sendSprite(athumbnailsprnum, #msetphotonum, getAt(galbumphotoorder, aphotocount))
  14.     sendSprite(athumbnailsprnum, #mupdatethumbnailview)
  15.   end repeat
  16.   updateStage()
  17.   resetcurs()
  18. end
  19.  
  20. on swapalbumphotoorder vphotoindex1, vphotoindex2
  21.   if (vphotoindex1 > count(galbumphotoorder)) or (vphotoindex2 > count(galbumphotoorder)) then
  22.     insertalbumphotoorder(vphotoindex1, vphotoindex2)
  23.   else
  24.     set galbumphotoorder to swapitem(galbumphotoorder, vphotoindex1, vphotoindex2)
  25.     set gcurphotoorder to galbumphotoorder
  26.     updatealbumeditorthumbnail()
  27.     setcurphotonum(vphotoindex1)
  28.   end if
  29. end
  30.  
  31. on insertalbumphotoorder vinsertpos, vphotoindex
  32.   if vinsertpos > count(galbumphotoorder) then
  33.     set vinsertpos to count(galbumphotoorder) + 1
  34.   end if
  35.   if vinsertpos = vphotoindex then
  36.     exit
  37.   end if
  38.   if vinsertpos < vphotoindex then
  39.     set galbumphotoorder to insertitem(galbumphotoorder, vinsertpos, getAt(galbumphotoorder, vphotoindex))
  40.     deleteAt(galbumphotoorder, vphotoindex + 1)
  41.     set gcurphotoorder to galbumphotoorder
  42.     setcurphotonum(vinsertpos)
  43.   else
  44.     set galbumphotoorder to insertitem(galbumphotoorder, vinsertpos, getAt(galbumphotoorder, vphotoindex))
  45.     deleteAt(galbumphotoorder, vphotoindex)
  46.     set gcurphotoorder to galbumphotoorder
  47.     setcurphotonum(vinsertpos - 1)
  48.   end if
  49.   updatealbumeditorthumbnail()
  50. end
  51.  
  52. on deletealbumphotoorder vphotoindex
  53.   deleteAt(galbumphotoorder, vphotoindex)
  54.   set gcurphotoorder to galbumphotoorder
  55.   set anewphotoindex to cropvalue(vphotoindex, 1, count(galbumphotoorder))
  56.   setcurphotonum(anewphotoindex)
  57.   updatealbumeditorthumbnail()
  58. end
  59.  
  60. on allclearalbumphotoorder
  61.   playclicksnd()
  62.   set galbumphotoorder to []
  63.   set gcurphotoorder to []
  64.   setcurphotonum(0)
  65.   updatealbumeditorthumbnail()
  66.   unLoad()
  67. end
  68.  
  69. on exitalbumeditorclickreaction
  70.   playclicksnd()
  71.   go("album")
  72.   updatephotoview()
  73.   unLoad()
  74. end
  75.